In object oriented programming, real world objects are modeled by software objects that have encapsulated therein special procedures and data elements. In object-oriented programming terminology, procedures are referred to as methods. To avoid having to redefine the same methods and data members for each and every occurrence of an object, object-oriented programming provides the concept of classes. An inherent structure of one or more levels of increasingly more specialized classes is created to provide templates that define the methods and variables to be included in the objects of each class. The classes at the lower levels of the inheritance structure inherit the behavior, methods, and variables of the classes above. Classes above a certain class in an inheritance structure are referred to as parent classes setting up a parent-child relationship. Therefore, an object belonging to a class is a member of that class, and contains the special behavior defined by the class. In this manner, each object is an instance of a defined class or template and the need to redefine the methods and data members for each occurrence of the object is eliminated.
One example of an object-oriented programming language is Java, developed by Sun Microsystems. To define a class in Java, the programmer creates a .java file containing the source code to define the class. The .java file is compiled to create a .class file containing the executable code to define the class. Instances of the class file are instantiated to create an object containing data and methods defined by the .class file.
Object-oriented programming is a method of programming that abstracts a computer program into manageable sections. The key to object-oriented programming is the concept of encapsulation. Encapsulation is a method by which the subroutines, or methods, that manipulate data are combined with the declaration and storage of that data. This encapsulation prevents the data from arbitrarily being accessed by other programs' subroutines, or objects. When an object is invoked, the associated data is available and can be manipulated by any of the methods that are defined within an object to act upon the data.
The basic component of encapsulation is a class. A class is an abstraction for a set of objects that share the same structure and behavior. An object is a single instance of a class that retains the structure and behavior of the class. Objects also contain methods that are the processes by which an object is instructed to perform some procedure or manipulation of data that it controls. Classes may also be characterized by their interface which defines the elements necessary for proper communication between objects.
Often, a programmer needs to add functionality to an existing class of objects but either does not want to change the existing .class file or does not have access to the source code and, therefore, does not have the ability to alter the source code. In addition, the programmer may not want to alter the functionality of the existing .class file since a .class file may be used in more than one application program. Therefore, it is desirable to add functionality to an existing class of objects during the execution of an application program without altering the associated source code.
Distributed computing allows an object on one computer system to seamlessly communicate with and manipulate an object contained in a second computer system when the two computer systems are connected by a computer network. The second computer system may also be referred to as another address space. Client/server systems are an example of this type of distributed computing system. Sophisticated distributed computing systems have removed the communications burden from the computer programs, or objects in an object oriented programming environment, and placed it in a mid-level operating system that manages communications across a computer network to facilitate a client's access to and manipulation of data contained on a server system. The server system could be a computer in a different address space and remote to a user on a client system.
In distributed processing environments, objects in different address spaces may exchange a large number of messages. Using traditional distributed processing communications techniques may lead to slow response time and increased network traffic. Moving a first object to the same address space as a second object makes communications between the two objects local and, therefore, reduces network traffic. Local messages are often at least one thousand times faster than remote messages sent through the distributed computing system.